package com.mingke.java.NIO;

import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;

/**
 * @author mingke
 * @function TODO
 * @date 2021/11/8
 */
public class NIOSocketClient {
    private Integer cid; //全局统一的ID
    private SocketChannel socketChannel;
    private ByteBuffer byteBuffer;

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public SocketChannel getSocketChannel() {
        return socketChannel;
    }

    public void setSocketChannel(SocketChannel socketChannel) {
        this.socketChannel = socketChannel;
    }

    public ByteBuffer getByteBuffer() {
        return byteBuffer;
    }

    public void setByteBuffer(ByteBuffer byteBuffer) {
        this.byteBuffer = byteBuffer;
    }

    //自定义构造器
    public NIOSocketClient(SocketChannel socketChannel, ByteBuffer byteBuffer) {
        this.socketChannel = socketChannel;
        this.byteBuffer = byteBuffer;
    }
}
